/*
 * Copyright 2021 ThoughtWorks, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
/**
 * Buttons.css
 */


/**
 * TABLE OF CONTENTS
 *
 * TODO: NEEDS MIGRATING
 */


/**
 * TODO: NEEDS MIGRATING
 */

/* Buttons grouping */
.form_buttons {
    padding: 8px;
    margin-bottom: 10px;
    background-color: #999;
    background-repeat: repeat-x;
    background-position: center center;
    -moz-border-radius: 6px;
    -webkit-border-radius: 6px;
    border-radius: 6px;
    border: 0;
    -moz-box-shadow: inset 0 0 4px #666;
}

.form_buttons button,
.form_buttons a.link_as_button{
  height: 27px;
}
.form_buttons button.submit:hover,
.form_buttons button.submit_hover,
.form_buttons a.link_as_button_hover{
  height: 27px;
}

.admin_wrapper .form_buttons {
    margin: 10px 0 0 0;
}


button,
a.link_as_button {
  position: relative;
  border: 0;
  padding: 0;
  cursor: pointer;
  overflow: visible; /* removes extra side padding in IE */
  font-weight: normal;
  line-height: 13px; /* button defaults to 13, need to set both so they look the same/fixes height issue */;
}
button::-moz-focus-inner,
a.link_as_button::-moz-focus-inner {
  border: none;  /* overrides extra padding in Firefox */
}
button span,
a.link_as_button span {
  position: relative;
  display: block;
  white-space: nowrap;
}

@media screen and (-webkit-min-device-pixel-ratio:0) {
  /* Safari and Google Chrome only - fix margins */
  button span,
    a.link_as_button span {
    margin-top: -1px;
  }
}

/*shared all buttons*/
input[type='submit'],
input[type='submit']:hover,

button.submit,
button.submit:hover,
button.submit_hover,

button.submit.header_submit,
button.submit.header_submit:hover,
button.submit_hover.header_submit,

button.ui-state-default,
button.ui-state-default:hover,

a.link_as_button,
a.link_as_button:hover,
a.link_as_button_hover,

a.link_as_header_button,
a.link_as_header_button:hover,
a.link_as_header_button_hover,

button.submit.disabled,
button.submit.disabled:hover,
button.submit.disabled_hover,

button.submit.header_submit.disabled,
button.submit.header_submit.disabled:hover,
button.submit.header_submit.disabled_hover,

input.submit,
input.submit:hover,
input.submit_hover,

input.submit.disabled,
input.submit.disabled:hover,
input.submit.disabled_hover,

a.link_as_button.disabled,
a.link_as_button.disabled:hover,
a.link_as_button_hover.disabled

a.link_as_header_button.disabled,
a.link_as_header_button.disabled:hover,
a.link_as_header_button_hover.disabled {
    padding: 6px 8px;
    margin-left:5px;
    text-align: center;
    background: #444 image_url('g9/backgrounds/overlay_gradient_button.png') repeat-x bottom left;
    color: #FFF;
    -moz-border-radius: 4px;
    -webkit-border-radius: 4px;
    border-radius: 4px;
    -moz-box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.2);
    -webkit-box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.2);
    box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.2);
    font-size: 11px;
    text-transform: uppercase;
}

a.link_as_header_button,
a.link_as_header_button:hover,
a.link_as_header_button_hover,
a.link_as_header_button.disabled,
a.link_as_header_button.disabled:hover,
a.link_as_header_button_hover.disabled{
    float: left;
}

button.submit.header_submit,
button.submit.header_submit:hover,
button.submit.header_submit_hover,

a.link_as_header_button,
a.link_as_header_button:hover,
a.link_as_header_button_hover,
a.link_as_header_button.disabled,
a.link_as_header_button.disabled:hover,
a.link_as_header_button_hover.disabled {
    background-color: #DDD;
    color: #000;
}

#job_actions button.submit { /* styling for the jobs listing tab rerun button */
   margin-bottom: 10px;
}

#config_save_actions button.primary {
    padding: 2px 5px;
  margin-right:5px;
  text-align: center;
    -moz-border-radius: 4px;
    -webkit-border-radius: 4px;
    border-radius: 4px;
    -moz-box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.2);
    -webkit-box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.2);
    box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.2);
    font-size: 11px;
    color: white;
    text-transform: uppercase;
}

#config_save_actions button.primary {
    padding: 2px 5px;
  margin-right:5px;
  text-align: center;
    -moz-border-radius: 4px;
    -webkit-border-radius: 4px;
    border-radius: 4px;
    -moz-box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.2);
    -webkit-box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.2);
    box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.2);
    font-size: 11px;
    color: white;
    text-transform: uppercase;
}

#config_save_actions button.primary {
    padding: 5px 10px;
  margin-right:5px;
  text-align: center;
    -moz-border-radius: 4px;
    -webkit-border-radius: 4px;
    border-radius: 4px;
    -moz-box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.2);
    -webkit-box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.2);
    box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.2);
    font-size: 11px;
    color: white;
    text-transform: uppercase;
}

.form_buttons button.submit {
    min-width: 120px;
}

button.submit_small,
button.submit_small:hover
{
    padding: 4px 6px;
}

a.link_as_button {
    float: left;
}
.pipeline_bundle div.pipeline button.submit,
.pipeline_bundle div.pipeline a.link_as_button {

}
button.submit,
a.link_as_button {
  color:#fff;
}

button.submit.header_submit {
  color:#000;
}

button.submit span,
a.link_as_button span{
    padding: 0;
    color: #fff;
    font-size: 11px;
    height: auto;
    background: none;
}

button.submit.header_submit span{
    padding: 0;
    color: #000;
    font-size: 11px;
    height: auto;
    padding-right: 15px;
    background-image: image_url('g9/button_select_icon_dark.png');
    background-position: right center;
    background-repeat: no-repeat;
    display: block;
}

button.submit:hover,
button.submit_hover,
a.link_as_button:hover,
a.link_as_button_hover,
a.link_as_header_button:hover,
a.link_as_header_button_hover { /* the redundant class is used to apply the hover state with a script */
  background-color: #666;
  color:#fff;
  height: auto;
}

button.submit.header_submit:hover,
button.submit.header_submit_hover { /* the redundant class is used to apply the hover state with a script */
  background-color: #666;
  color:#fff;
  height: auto;
}

button.submit:hover span,
button.submit_hover span,
a.link_as_button:hover span,
a.link_as_button_hover span {
    padding: 0;
    color:#fff;
    height: auto;
}

button.submit.header_submit:hover span {
    background-image: image_url('g9/button_select_icon.png');
    color: #FFF;
    padding: 0 15px 0 0;
}


button.primary,
a.primary_link_as_button {
    background-color: #3399CC !important;
}

button.primary:hover,
a.primary_link_as_button:hover {
    background-color: #52b3e3 !important;
}

button.primary span{
    color: #FFF !important;
}



a.reset_button{
    float: left;

}

/* for the pause button */

.unpause_wrapper button.primary {
    background-color: #3399cc !important;
    height:22px;
}

.unpause_wrapper button.primary:hover {
    background-color: #52b3e3 !important;
}




//*html button.submit{
//    m: expression(this.onmouseover=new Function("this.className = 'submit_hover';"));
//}
//*html button.submit_hover{
//    m: expression(this.onmouseout=new Function("this.className = 'submit';"));
//}
//
//*html a.link_as_button{
//    width: 0;
//}
//*html a.link_as_button_hover{
//    width: 0;
//}
//*html a.link_as_button_hover span{
//    white-space: nowrap;
//    display:inline-block;
//    position: relative;
//}

button.submit.disabled,
button.submit.disabled:hover {
    cursor: default;
    background-color: #CCC;
}

button.submit.disabled:hover span {
    padding: 0;
  height:auto;
}
button.submit.disabled span,
a.link_as_button.disabled span,
a.link_as_button.disabled span:hover,
a.link_as_button_hover.disabled span
{
  color: #FFF;
  text-shadow: -1px -1px 1px #AAA;
}
/* Select Button (drop down) styles */
button.submit span img,
button.submit:hover span img,
button.submit_hover span img {
    position: relative;
    top: -1px;
    margin-left: 7px;
    margin-right: -2px;
}


/* pipeline module buttons */
.changes_button_wrapper button.submit,
.operate button.submit,
.deploy button.submit {
    background-color: #f6f6f6;
}

.changes_button_wrapper button.submit span,
.operate button.submit span,
.deploy button.submit span {
    color: #333;
}

.changes_button_wrapper button.submit:hover,
.operate button.submit:hover,
.deploy button.submit:hover {
    background-color: #666;
}

.changes_button_wrapper button.submit:hover span,
.operate button.submit:hover span,
.deploy button.submit:hover span {
    color: #fff;
}

.trigger_with_options_wrapper button.disabled:hover{
    background-color: #f6f6f6;
}

.trigger_wrapper button.disabled:hover {
    background-color: #f6f6f6;
}



/*Image Buttons*/
.trigger_with_options_wrapper button.image,
.trigger_with_options_wrapper button.image:hover,
.trigger_wrapper button.image,
.trigger_wrapper button.image:hover,
.pause_wrapper button.image,
.pause_wrapper button.image:hover,
.unpause_wrapper button.image,
.unpause_wrapper button.image:hover
{
    padding: 0;
}
.trigger_with_options_wrapper button.image span,
.trigger_with_options_wrapper button.image:hover span,
.trigger_wrapper button.image span,
.trigger_wrapper button.image:hover span,
.pause_wrapper button.image span,
.pause_wrapper button.image:hover span,
.unpause_wrapper button.image span,
.unpause_wrapper button.image:hover span{
    width: 37px;
    height: 22px;
}
.trigger_with_options_wrapper button.image span{
    background: image_url('g9/icons/bg_sprite_pipeline_actions.png') -74px -30px no-repeat transparent;
}
.trigger_with_options_wrapper button.image:hover span{
    background: image_url('g9/icons/bg_sprite_pipeline_actions.png') -74px 0 no-repeat transparent;
}
.trigger_wrapper button.image span{
    background: image_url('g9/icons/bg_sprite_pipeline_actions.png') -37px -30px no-repeat transparent;
}
.trigger_wrapper button.image:hover span{
    background: image_url('g9/icons/bg_sprite_pipeline_actions.png') -37px 0 no-repeat transparent;
}
.pause_wrapper button.image span{
    background: image_url('g9/icons/bg_sprite_pipeline_actions.png') 0 -30px no-repeat transparent;
}
.pause_wrapper button.image:hover span{
    background: image_url('g9/icons/bg_sprite_pipeline_actions.png') 0 0 no-repeat transparent;
}
.unpause_wrapper button.image span{
    background: image_url('g9/icons/bg_sprite_pipeline_actions.png') 0 0 no-repeat transparent;
}
.unpause_wrapper button.image:hover span{
    background: image_url('g9/icons/bg_sprite_pipeline_actions.png') 0 0 no-repeat transparent;
}
.trigger_with_options_wrapper button.disabled span,
.trigger_with_options_wrapper button.disabled:hover span{
    background: image_url('g9/icons/bg_sprite_pipeline_actions.png') -74px -60px no-repeat transparent;
}
.trigger_wrapper button.disabled span,
.trigger_wrapper button.disabled:hover span{
    background: image_url('g9/icons/bg_sprite_pipeline_actions.png') -37px -60px no-repeat transparent;
}
.pause_wrapper button.disabled span,
.pause_wrapper button.disabled:hover span{
    background: image_url('g9/icons/bg_sprite_pipeline_actions.png') 0 -60px no-repeat transparent;
}
.unpause_wrapper button.disabled span,
.unpause_wrapper button.disabled:hover span{
    background: image_url('g9/icons/bg_sprite_pipeline_actions.png') 0 -60px no-repeat transparent;
}


/* add special stuffs when they are in the edit panel */
.edit_panel button.submit,
.edit_panel a.link_as_button{
  background: image_url('g9/backgrounds/overlay_gradient_button.png') repeat-x left bottom #F6F6F6;
  -moz-box-shadow: 0 0 3px rgba(0, 0, 0, 0.2) inset;
  -webkit-box-shadow: 0 0 3px rgba(0, 0, 0, 0.2) inset;
  box-shadow: 0 0 3px rgba(0, 0, 0, 0.2) inset;
}
.edit_panel button.submit:hover,
.edit_panel a.link_as_button:hover {
  background-color: #F6F6F6;
  -moz-box-shadow: 0 0 3px rgba(0, 0, 0, 0.6) inset;
  -webkit-box-shadow: 0 0 3px rgba(0, 0, 0, 0.6) inset;
  box-shadow: 0 0 3px rgba(0, 0, 0, 0.6) inset;
}


.edit_panel button span,
.edit_panel a.link_as_button span,
.edit_panel button:hover span,
.edit_panel a.link_as_button:hover span,
.edit_panel a.link_as_button_hover span {
  color: #333;
}


#agents_form .edit_panel .download_agent {
    float:right;
    margin-right: 0;
}
*+html #agents_form .edit_panel .download_agent {
  padding-top: 8px;
  padding-bottom: 10px;
}

#agents_form .edit_panel .download_agent span {
    text-transform: uppercase;
}

#agents_form .edit_panel a:hover {
    text-decoration: none;
}

input[type='submit']{
    min-width: 100px;
    box-sizing: border-box;
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
    line-height: 11px;
    padding: 6px 8px;
    margin: 0;
    border: 0px none;
    text-align: center;
    -moz-border-radius: 4px;
    -webkit-border-radius: 4px;
    border-radius: 4px;
    font-size: 11px;
    color: white;
    text-transform: uppercase;
    height: 25px;
    cursor: pointer;
}
input[type='submit']:hover {
    padding: 6px 8px;
    margin-left: 0;
    background-color: #666666;
}
input[type='submit'].primary, .buttons-group .primary{
    background-color: #3399CC;
}
input[type='submit'].primary:hover, .buttons-group .primary:hover{
    background-color: #52b3e3;
}
input[type='submit'][disabled='disabled']{
    -moz-opacity: 0.50;
    opacity:.50;
    filter: alpha(opacity=50);
    cursor: default;
}
input[type='submit'][disabled='disabled'].primary:hover{
    background-color: #3399CC !important;
}



button.edit-environment {
  float: right;
  margin-right: 5px;
}
